package wiiusej.activeTaskManagement;

import java.util.concurrent.locks.Condition;
import java.util.concurrent.locks.Lock;

import org.apache.log4j.Logger;

import wiiusej.Wiimote;
import wiiusej.apptest.WiimoteEventListener;

public class PermanentController implements Runnable{

	protected WiimoteEventListener myListener;
	protected Wiimote myWiimote;
	protected SharedCell sharedCell;
	protected Lock lock;
	protected Condition condition;
	
	protected Logger fileLogger;
	
	protected int freqMillis;
	
	protected static final int INITIAL_FREQ = 2000;
	protected static final int MAX_FREQ = 500;
	
	

	public PermanentController(WiimoteEventListener myListener, Wiimote wiimote, 
			SharedCell sharedCell, Lock lock, Condition condition){
		
		this.myListener = myListener;
		this.myWiimote = wiimote;
		this.sharedCell = sharedCell;
		this.lock = lock;
		this.condition = condition;
		
	}

	@Override
	public void run() {		
		
	}
	
	protected void uploadSoundFrequency(){		
		int uploaded;		
		if( (uploaded = sharedCell.getFrequencyMillis()) != freqMillis){
			freqMillis = uploaded;			
		}		
	}
	
	
}
